load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "adminpause",
    srcs = [
        "ddl_data_generation.go",
        "ddl_stmt_cases.go",
        "global.go",
    ],
    importpath = "github.com/pingcap/tidb/ddl/tests/adminpause",
    visibility = ["//visibility:public"],
    deps = [
        "//ddl",
        "//domain",
        "//parser/model",
        "//testkit",
        "//util/logutil",
    ],
)

go_test(
    name = "adminpause_test",
    timeout = "moderate",
    srcs = [
        "main_test.go",
        "pause_cancel_test.go",
        "pause_negative_test.go",
        "pause_resume_test.go",
    ],
    embed = [":adminpause"],
    flaky = True,
    race = "on",
    shard_count = 14,
    deps = [
        "//config",
        "//ddl",
        "//ddl/testutil",
        "//ddl/util/callback",
        "//domain",
        "//errno",
        "//parser/model",
        "//testkit",
        "//testkit/testsetup",
        "//util/sqlexec",
        "@com_github_pingcap_failpoint//:failpoint",
        "@com_github_stretchr_testify//require",
        "@org_uber_go_atomic//:atomic",
        "@org_uber_go_goleak//:goleak",
        "@org_uber_go_zap//:zap",
    ],
)
